package com.joolun.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.joolun.common.annotation.Excel;
import com.joolun.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 企业部门对象 scrm_department
 * 
 * @author joolun
 * @date 2025-02-25
 */
@Data
@Accessors(chain = true)
public class ScrmDepartment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部企业ID */
    @Excel(name = "外部企业ID")
    private String extCorpId;

    /** 企微定义的部门ID */
    @Excel(name = "企微定义的部门ID")
    private Long extId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    private String name;

    /** 上级部门ID,根部门为1 */
    @Excel(name = "上级部门ID,根部门为1")
    private Long extParentId;

    /** 在父部门中的次序值 */
    @Excel(name = "在父部门中的次序值")
    @TableField("`order`")
    private Long order;

    /** 部门使用的欢迎语 */
    @Excel(name = "部门使用的欢迎语")
    private Long welcomeMsgId;

    /** 成员数量 */
    @Excel(name = "成员数量")
    private Long staffNum;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 父部门ID */
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    private Integer orderNum;


    // 0-顶级，1-主体，2-部门
    private Integer type;

    // 系统部门Id
    private Long sysDeptId;


    @ApiModelProperty(value = "是否需要同步到企业微信(用于事件同步)", hidden = true)
    @TableField(exist = false)
    private boolean needSynToWx = true;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setExtCorpId(String extCorpId) 
    {
        this.extCorpId = extCorpId;
    }

    public String getExtCorpId() 
    {
        return extCorpId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setExtParentId(Long extParentId) 
    {
        this.extParentId = extParentId;
    }

    public Long getExtParentId() 
    {
        return extParentId;
    }
    public void setOrder(Long order) 
    {
        this.order = order;
    }

    public Long getOrder() 
    {
        return order;
    }
    public void setWelcomeMsgId(Long welcomeMsgId) 
    {
        this.welcomeMsgId = welcomeMsgId;
    }

    public Long getWelcomeMsgId() 
    {
        return welcomeMsgId;
    }
    public ScrmDepartment setStaffNum(Long staffNum)
    {
        this.staffNum = staffNum;
        return null;
    }

    public Long getStaffNum() 
    {
        return staffNum;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

}
